-
Notifications
You must be signed in to change notification settings - Fork 10
Dependabot updates + Migration to new ESLint flat config system #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ve unused variables and imports
WalkthroughThis pull request removes obsolete ESLint configuration files and updates dependency versions and declarations in the project’s configuration files. It also refactors several source files by removing unused callback parameters and reorganizing import statements. Test files have been streamlined with updated variable declarations and import adjustments, while view and type files have minor refactorings. Additionally, Node.js versions have been updated in CI workflows, and the webpack configuration has been migrated to ES module syntax. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
webpack.config.js (1)
3-3
: Redundant 'use strict' directive.The 'use strict' directive is redundant in ES modules as they operate in strict mode by default.
- 'use strict';
🧰 Tools
🪛 Biome (1.9.4)
[error] 2-3: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
webpack.config.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: Review the JavaScript code for conformity with th...
**/*.js
: Review the JavaScript code for conformity with the Google JavaScript style guide, highlighting any deviations.
webpack.config.js
🔇 Additional comments (1)
webpack.config.js (1)
7-60
:❓ Verification inconclusive
Ensure configuration compatibility with webpack when using ES modules.
The webpack configuration uses several CommonJS patterns. If fully converting to ES modules, verify that the configuration works properly with webpack's ES module support.
🏁 Script executed:
#!/bin/bash # Check webpack version and compatibility npm list webpack # Also check if this project is using webpack-cli and its version npm list webpack-cliLength of output: 145
Ensure ES Module Compatibility in Webpack Configuration
The webpack configuration in
webpack.config.js
(lines 7–60) currently uses CommonJS patterns. If you plan to switch fully to ES modules, please verify that:
- The configuration works correctly with webpack’s ES module support.
- Your project’s
package.json
properly includes and specifies versions for bothwebpack
andwebpack-cli
, as the initial npm lookup returned no output. Consider manually checking these dependencies to confirm they are set up correctly.🧰 Tools
🪛 ESLint
[error] 18-18: '__dirname' is not defined.
(no-undef)
[error] 54-54: '__dirname' is not defined.
(no-undef)
[error] 59-59: 'module' is not defined.
(no-undef)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/test/ts_tests/commands/stackCommands.test.ts (1)
82-82
: Consider avoidingany
type assertionsType assertions using
as any
bypass TypeScript's type checking, which can hide potential type errors. Consider creating proper mock objects that satisfy the expected types instead.// Instead of: await stackCommands.renameStack({ label: 'Old Stack', id: stackId } as any); // Consider: const mockStackItem: StackTreeItem = { label: 'Old Stack', id: stackId // Add other required properties } as StackTreeItem; await stackCommands.renameStack(mockStackItem);
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/commands/pipelines/DagRender.ts
(1 hunks)src/test/ts_tests/__mocks__/MockViewProviders.ts
(1 hunks)src/test/ts_tests/commands/stackCommands.test.ts
(1 hunks)src/test/ts_tests/extension.test.ts
(2 hunks)src/test/ts_tests/integration/serverConfigUpdate.test.ts
(1 hunks)src/test/ts_tests/unit/eventBus.test.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- src/test/ts_tests/mocks/MockViewProviders.ts
- src/test/ts_tests/unit/eventBus.test.ts
- src/commands/pipelines/DagRender.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/test/ts_tests/extension.test.ts
- src/test/ts_tests/integration/serverConfigUpdate.test.ts
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.ts`: Review the Typescript code for conformity with in...
**/*.ts
: Review the Typescript code for conformity with industry standards and best practices, highlighting any deviations.
src/test/ts_tests/commands/stackCommands.test.ts
🔇 Additional comments (1)
src/test/ts_tests/commands/stackCommands.test.ts (1)
14-22
: Import statements improved for better code organizationThe refactoring of import statements improves code organization and maintainability by:
- Using consistent namespaced imports (e.g.,
import * as sinon from 'sinon'
)- Making explicit imports for dependencies (
stackUtils
,EventBus
,LSClient
,globalUtils
)- Better structuring of imports for clarity
This change aligns with modern TypeScript best practices and will make dependency tracking clearer throughout the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/dependabot.yml (1)
9-9
: Minor Formatting Detail: Extra Spacing in Directory Line
The extra spacing after the directory value (/ # Location of package manifests
) does not affect functionality, but please confirm that this intentional formatting aligns with your team's style guidelines.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (81)
.github/dependabot.yml
(1 hunks)eslint.config.mjs
(1 hunks)resources/components-form/components.css
(1 hunks)resources/components-form/components.js
(1 hunks)resources/dag-view/dag.css
(1 hunks)resources/dag-view/dag.js
(1 hunks)resources/stacks-form/stacks.css
(1 hunks)resources/stacks-form/stacks.js
(1 hunks)src/commands/components/ComponentsForm.ts
(1 hunks)src/commands/components/cmds.ts
(2 hunks)src/commands/components/registry.ts
(1 hunks)src/commands/environment/cmds.ts
(1 hunks)src/commands/environment/registry.ts
(1 hunks)src/commands/pipelines/DagRender.ts
(1 hunks)src/commands/pipelines/cmds.ts
(1 hunks)src/commands/pipelines/registry.ts
(1 hunks)src/commands/pipelines/utils.ts
(1 hunks)src/commands/server/cmds.ts
(3 hunks)src/commands/server/registry.ts
(1 hunks)src/commands/server/utils.ts
(1 hunks)src/commands/stack/StackForm.ts
(1 hunks)src/commands/stack/cmds.ts
(5 hunks)src/commands/stack/registry.ts
(1 hunks)src/commands/stack/utils.ts
(1 hunks)src/common/WebviewBase.ts
(1 hunks)src/common/api.ts
(1 hunks)src/common/constants.ts
(1 hunks)src/common/log/logging.ts
(1 hunks)src/common/panels.ts
(1 hunks)src/common/python.ts
(1 hunks)src/common/server.ts
(1 hunks)src/common/settings.ts
(1 hunks)src/common/status.ts
(1 hunks)src/common/utilities.ts
(1 hunks)src/common/vscodeapi.ts
(1 hunks)src/extension.ts
(1 hunks)src/services/EventBus.ts
(1 hunks)src/services/LSClient.ts
(3 hunks)src/services/ZenExtension.ts
(2 hunks)src/test/python_tests/lsp_test_client/constants.py
(1 hunks)src/test/python_tests/lsp_test_client/session.py
(4 hunks)src/test/python_tests/lsp_test_client/utils.py
(1 hunks)src/test/ts_tests/__mocks__/MockEventBus.ts
(1 hunks)src/test/ts_tests/__mocks__/MockLSClient.ts
(4 hunks)src/test/ts_tests/__mocks__/MockViewProviders.ts
(1 hunks)src/test/ts_tests/__mocks__/constants.ts
(1 hunks)src/test/ts_tests/commands/serverCommands.test.ts
(2 hunks)src/test/ts_tests/commands/stackCommands.test.ts
(2 hunks)src/test/ts_tests/extension.test.ts
(2 hunks)src/test/ts_tests/integration/serverConfigUpdate.test.ts
(1 hunks)src/test/ts_tests/unit/ServerDataProvider.test.ts
(1 hunks)src/test/ts_tests/unit/eventBus.test.ts
(1 hunks)src/types/HydratedTypes.ts
(3 hunks)src/types/LSClientResponseTypes.ts
(1 hunks)src/types/LSNotificationTypes.ts
(1 hunks)src/types/PipelineTypes.ts
(1 hunks)src/types/ServerInfoTypes.ts
(1 hunks)src/types/StackTypes.ts
(1 hunks)src/utils/componentUtils.ts
(1 hunks)src/utils/constants.ts
(1 hunks)src/utils/global.ts
(1 hunks)src/utils/notifications.ts
(1 hunks)src/utils/refresh.ts
(1 hunks)src/views/activityBar/common/ErrorTreeItem.ts
(2 hunks)src/views/activityBar/common/LoadingTreeItem.ts
(1 hunks)src/views/activityBar/common/PaginatedDataProvider.ts
(1 hunks)src/views/activityBar/common/PaginationTreeItems.ts
(1 hunks)src/views/activityBar/common/TreeItemWithChildren.ts
(1 hunks)src/views/activityBar/componentView/ComponentDataProvider.ts
(1 hunks)src/views/activityBar/environmentView/EnvironmentDataProvider.ts
(1 hunks)src/views/activityBar/environmentView/EnvironmentItem.ts
(1 hunks)src/views/activityBar/environmentView/viewHelpers.ts
(1 hunks)src/views/activityBar/pipelineView/PipelineDataProvider.ts
(1 hunks)src/views/activityBar/pipelineView/PipelineTreeItems.ts
(1 hunks)src/views/activityBar/serverView/ServerDataProvider.ts
(1 hunks)src/views/activityBar/serverView/ServerTreeItems.ts
(1 hunks)src/views/activityBar/stackView/StackDataProvider.ts
(2 hunks)src/views/activityBar/stackView/StackTreeItems.ts
(1 hunks)src/views/panel/panelView/PanelDataProvider.ts
(1 hunks)src/views/panel/panelView/PanelTreeItem.ts
(1 hunks)src/views/statusBar/index.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (56)
- src/views/panel/panelView/PanelTreeItem.ts
- src/views/activityBar/common/PaginationTreeItems.ts
- src/test/python_tests/lsp_test_client/utils.py
- src/views/panel/panelView/PanelDataProvider.ts
- src/types/LSClientResponseTypes.ts
- src/views/activityBar/pipelineView/PipelineTreeItems.ts
- resources/dag-view/dag.css
- src/views/activityBar/common/TreeItemWithChildren.ts
- src/common/constants.ts
- src/types/LSNotificationTypes.ts
- src/types/PipelineTypes.ts
- src/views/activityBar/serverView/ServerDataProvider.ts
- src/types/ServerInfoTypes.ts
- src/common/server.ts
- src/types/StackTypes.ts
- resources/dag-view/dag.js
- resources/stacks-form/stacks.js
- resources/stacks-form/stacks.css
- src/utils/notifications.ts
- src/commands/components/registry.ts
- src/test/python_tests/lsp_test_client/constants.py
- src/common/panels.ts
- src/utils/global.ts
- src/test/ts_tests/mocks/MockEventBus.ts
- src/utils/componentUtils.ts
- src/utils/constants.ts
- src/test/ts_tests/mocks/constants.ts
- src/common/WebviewBase.ts
- src/commands/stack/utils.ts
- src/common/api.ts
- src/commands/stack/StackForm.ts
- resources/components-form/components.css
- src/utils/refresh.ts
- src/commands/pipelines/utils.ts
- src/views/activityBar/environmentView/EnvironmentItem.ts
- src/views/activityBar/common/PaginatedDataProvider.ts
- src/views/activityBar/environmentView/viewHelpers.ts
- src/common/utilities.ts
- src/common/log/logging.ts
- src/views/statusBar/index.ts
- src/commands/environment/registry.ts
- src/commands/environment/cmds.ts
- src/commands/server/registry.ts
- src/views/activityBar/common/LoadingTreeItem.ts
- src/extension.ts
- src/views/activityBar/stackView/StackTreeItems.ts
- src/commands/pipelines/cmds.ts
- src/commands/pipelines/registry.ts
- src/services/ZenExtension.ts
- src/common/status.ts
- resources/components-form/components.js
- src/commands/components/ComponentsForm.ts
- src/views/activityBar/environmentView/EnvironmentDataProvider.ts
- src/test/python_tests/lsp_test_client/session.py
- src/services/EventBus.ts
- src/views/activityBar/serverView/ServerTreeItems.ts
🚧 Files skipped from review as they are similar to previous changes (24)
- src/commands/components/cmds.ts
- src/commands/server/cmds.ts
- src/common/vscodeapi.ts
- src/views/activityBar/pipelineView/PipelineDataProvider.ts
- src/test/ts_tests/mocks/MockLSClient.ts
- src/test/ts_tests/mocks/MockViewProviders.ts
- src/common/python.ts
- src/commands/server/utils.ts
- src/views/activityBar/common/ErrorTreeItem.ts
- src/commands/stack/registry.ts
- src/test/ts_tests/unit/eventBus.test.ts
- src/common/settings.ts
- src/services/LSClient.ts
- src/views/activityBar/componentView/ComponentDataProvider.ts
- src/test/ts_tests/commands/serverCommands.test.ts
- src/commands/stack/cmds.ts
- src/test/ts_tests/unit/ServerDataProvider.test.ts
- eslint.config.mjs
- src/types/HydratedTypes.ts
- src/test/ts_tests/integration/serverConfigUpdate.test.ts
- src/test/ts_tests/extension.test.ts
- src/test/ts_tests/commands/stackCommands.test.ts
- src/views/activityBar/stackView/StackDataProvider.ts
- src/commands/pipelines/DagRender.ts
🔇 Additional comments (1)
.github/dependabot.yml (1)
15-16
: Improved Update-Types Declaration
Converting the multi-line update-types list to a single-line array ([minor, patch]
) enhances clarity and conciseness while preserving the intended behavior.
This PR migrates our ESLint configuration from the legacy
.eslintrc
files to the new flat config system (eslint.config.js
) introduced in ESLint v9. I've also updated the TypeScript configuration to resolve import path issues and fixed various linting errors throughout the codebase.Dependency Changes
Upgrades
@types/mocha
:10.0.6
→10.0.10
@vscode/vsce
:2.24.0
→3.2.2
eslint
:8.56.0
→9.22.0
(Major version upgrade)ts-loader
:9.5.1
→9.5.2
webpack-cli
:5.1.4
→6.0.1
(Major version upgrade)Additions
@eslint/js
:^9.22.0
eslint-plugin-prettier
:^5.2.3
typescript-eslint
:^8.26.0
Removals
@typescript-eslint/eslint-plugin
@typescript-eslint/parser
Notable Changes
typescript-eslint
package.eslintrc
and.eslintrc.json
with a singleeslint.config.mjs
webpack.config.js
towebpack.config.mjs
and updated import syntaxESLint Rule Changes
@typescript-eslint/consistent-type-definitions
: Set to off instead of error to ease migration@typescript-eslint/no-explicit-any
: Maintained as warning@typescript-eslint/no-unused-vars
: Maintained as warningSummary by CodeRabbit
Chores
Refactor
Tests